#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
typedef int HPDataType;
typedef struct Heap {
	HPDataType* arr;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* hp);

void HeapDestory(Heap* hp);

int HeapEmpty(Heap* hp);

void HeapPrint(Heap* hp);

void HeapPush(Heap* hp, HPDataType x);

void HeapPop(Heap* hp);

HPDataType HeapTop(Heap* hp);

int HeapSize(Heap* hp);
void Swap(HPDataType* x, HPDataType* y);
void AdjustUp(HPDataType* arr,int size);
void AdjustDown(HPDataType* arr,int parent,int size);